package com.alkin.thing.framework.security.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 限制app登录账号数量
 */
@Component
@ConfigurationProperties(prefix = "app.login")
@Data
public class AppLoginConfig {
    private String limit;

    public Integer getLoginUserLimit() {
        if (limit == null) {
            return null;
        }
        try {
            return Integer.parseInt(limit);
        } catch (Exception e) {
            return null;
        }
    }

}
